package db;

// Generated 12.06.2012 19:50:00 by Hibernate Tools 3.4.0.CR1

import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Generated;
import org.hibernate.annotations.GenerationTime;

/**
 * ItemStore generated by hbm2java
 */
@Entity
@Table(name = "item_store")
public class ItemStore implements java.io.Serializable {

	private long itemStore;
	private Store store;
	private Item item;
	private BigDecimal itemCount;

	public ItemStore() {
	}

	public ItemStore(long itemStore) {
		this.itemStore = itemStore;
	}

	public ItemStore(long itemStore, Store store, Item item,
			BigDecimal itemCount) {
		this.itemStore = itemStore;
		this.store = store;
		this.item = item;
		this.itemCount = itemCount;
	}

	@Id
	@Generated(GenerationTime.NEVER)
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "item_store", unique = true, nullable = false, precision = 10, scale = 0)
	public long getItemStore() {
		return this.itemStore;
	}

	public void setItemStore(long itemStore) {
		this.itemStore = itemStore;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "store_fk")
	public Store getStore() {
		return this.store;
	}

	public void setStore(Store store) {
		this.store = store;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "item_fk")
	public Item getItem() {
		return this.item;
	}

	public void setItem(Item item) {
		this.item = item;
	}

	@Column(name = "item_count", precision = 131089, scale = 0)
	public BigDecimal getItemCount() {
		return this.itemCount;
	}

	public void setItemCount(BigDecimal itemCount) {
		this.itemCount = itemCount;
	}

}
